<template>
  <div class="error-page">
    <div class="error-page__code">4<span>0</span>4</div>
    <div class="error-page__desc">啊哦~ 你所访问的页面不存在</div>
    <div class="error-page__handle">
      <router-link to="/">
        <el-button type="primary" size="large">返回首页</el-button>
      </router-link>
      <el-button
        class="error-page__handle__go-back-btn"
        type="primary"
        size="large"
        @click="goBack"
        >返回上一页
      </el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";

const router = useRouter();

const goBack = () => {
  router.go(-1);
};
</script>

<style lang="scss" scoped>
@import "@/style/viriables";

.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: $search-bgColor;
  box-sizing: border-box;

  &__code {
    line-height: 1;
    font-size: 250px;
    font-weight: bolder;
    color: $btn-bgColor;

    & span {
      color: $success-bgColor;
    }
  }

  &__desc {
    font-size: 30px;
    color: $content-notice-fontcolor;
  }

  &__handle {
    margin-top: 30px;
    padding-bottom: 200px;

    &__go-back-btn {
      margin-left: 100px;
    }
  }
}
</style>
